import ArkFormOptionsDefault, {ArkFormOptions} from "../../common/ark-form/ArkFormOptions";
import {ArkActionButton} from "../../common-type/ark-action-button";

/** 操作 */
interface ActionGroup {
  /** 是否显示 */
  show?: boolean;
  /** 确认操作 */
  confirm?: ArkActionButton<any>;
  /** 清除操作 */
  clear?: ArkActionButton<any>;

  /**
   * 区别于 ArkActionButton 的属性逻辑
   * - disabled：未实现
   */
}

export interface ArkFilterFormOptions extends ArkFormOptions {
  /** 操作 */
  actions?: ActionGroup;
}

/** options默认值 */
const arkFilterFormOptionsDefault: Partial<ArkFilterFormOptions> = {
  ...ArkFormOptionsDefault,
  layout: {
    ...ArkFormOptionsDefault.layout,
    column: 4,
  },
  attributes: {
    "label-width": "96px",
  },
  actions: {
    show: true,
    confirm: {
      text: "查询",
    },
  },
};
export default arkFilterFormOptionsDefault;
